package com.xoms.admin.controller.springmvc.req;


import org.hibernate.validator.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

/**
 * 新建、编辑商品
 **/
public class EditProductParam {
	private String pid; // 商品id
	@NotEmpty(message = "商品名称不能为空")
	private String name; // 商品名称
	private String productBar; // 商品条形码
	@NotEmpty(message = "分类不能为空")
	private String categoryArr; // 分类
	private String imgUrl; // 商品图片
	private String specs; // 商品规格
	@NotEmpty(message = "单位不能为空")
	private String unitId; // 商品单位
	private String status; // 状态：1可售2可赠3可积分兑换。三个状态可同时：1，2，3
	private Integer warnNum; // 预警数量
	private Integer maxNum; // 仓库最大容量
	private Integer costType; // 成本核算方式
	private String remark; // 商品描述
	@Pattern(regexp = "^[1-5]$", message = "商品分类1成品2加工品3套餐4原料5娱乐")
	private String type; // 总部一级分类：1成品2加工品3套餐4原料5娱乐
	private String groups; // 商品组合原料JSON数组
	private String antiPrice; // 预计价格

	public void setPid(String pid) {
 		this.pid = pid;
	}

	public String getPid() {
 		return pid;
	}

	public void setName(String name) {
 		this.name = name;
	}

	public String getName() {
 		return name;
	}

	public void setProductBar(String productBar) {
 		this.productBar = productBar;
	}

	public String getProductBar() {
 		return productBar;
	}

	public void setCategoryArr(String categoryArr) {
 		this.categoryArr = categoryArr;
	}

	public String getCategoryArr() {
 		return categoryArr;
	}

	public void setImgUrl(String imgUrl) {
 		this.imgUrl = imgUrl;
	}

	public String getImgUrl() {
 		return imgUrl;
	}

	public void setSpecs(String specs) {
 		this.specs = specs;
	}

	public String getSpecs() {
 		return specs;
	}

	public void setUnitId(String unitId) {
 		this.unitId = unitId;
	}

	public String getUnitId() {
 		return unitId;
	}

	public void setStatus(String status) {
 		this.status = status;
	}

	public String getStatus() {
 		return status;
	}

	public void setWarnNum(Integer warnNum) {
 		this.warnNum = warnNum;
	}

	public Integer getWarnNum() {
 		return warnNum;
	}

	public void setMaxNum(Integer maxNum) {
 		this.maxNum = maxNum;
	}

	public Integer getMaxNum() {
 		return maxNum;
	}

	public void setCostType(Integer costType) {
 		this.costType = costType;
	}

	public Integer getCostType() {
 		return costType;
	}

	public void setRemark(String remark) {
 		this.remark = remark;
	}

	public String getRemark() {
 		return remark;
	}

	public void setType(String type) {
 		this.type = type;
	}

	public String getType() {
 		return type;
	}

	public void setGroups(String groups) {
 		this.groups = groups;
	}

	public String getGroups() {
 		return groups;
	}

	public void setAntiPrice(String antiPrice) {
 		this.antiPrice = antiPrice;
	}

	public String getAntiPrice() {
 		return antiPrice;
	}

}
